<!--{template common/header}-->
<!--{template home/spacecp_header}-->
		<!--{if $operation == 'password'}-->
			<form action="home.php?mod=spacecp&ac=profile" method="post" autocomplete="off" onsubmit="return profilecheck()">
				<input type="hidden" value="{FORMHASH}" name="formhash" />
				<table summary="{lang memcp_profile}" cellspacing="0" cellpadding="0" class="tfm">
					<caption>{lang old_password_comment}</caption>
					
					<tr>
						<th><strong class="rq" title="{lang required}">*</strong>{lang old_password}</th>
						<td><input type="password" name="oldpassword" id="oldpassword" class="px" /></td>
					</tr>

					<tr>
						<th>{lang new_password}</th>
						<td>
							<input type="password" name="newpassword" id="newpassword" class="px" />
							<p class="d">{lang memcp_profile_passwd_comment}</p>
						</td>
					</tr>

					<tr>
						<th>{lang new_password_confirm}</th>
						<td>
							<input type="password" name="newpassword2" id="newpassword2"class="px" />
							<p class="d">{lang memcp_profile_passwd_comment}</p>
						</td>
					</tr>

					<tr>
						<th>{lang email}</th>
						<td>
							<input type="text" name="emailnew" id="emailnew" value="$space[email]" class="px" />
							<p class="d">
								<!--{if $space['emailstatus']}-->
									{lang email_been_active}
								<!--{else}-->
									{lang email_acitve_message}
								<!--{/if}-->
							</p>
							<!--{if $_G['setting']['regverify'] == 1 && (($_G['group']['grouptype'] == 'member' && $_G['adminid'] == 0) && $_G['groupid'] == 8)}--><p class="d">{lang memcp_profile_email_comment}</p><!--{/if}-->
						</td>
					</tr>

					<tr>
						<th>{lang security_question}</th>
						<td>
							<select name="questionidnew" id="questionidnew">
								<option value="" selected>{lang memcp_profile_security_keep}</option>
								<option value="0">{lang security_question_0}</option>
								<option value="1">{lang security_question_1}</option>
								<option value="2">{lang security_question_2}</option>
								<option value="3">{lang security_question_3}</option>
								<option value="4">{lang security_question_4}</option>
								<option value="5">{lang security_question_5}</option>
								<option value="6">{lang security_question_6}</option>
								<option value="7">{lang security_question_7}</option>
							</select>
							<p class="d">{lang memcp_profile_security_comment}</p>
						</td>
					</tr>

					<tr>
						<th>{lang security_answer}</th>
						<td>
							<input type="text" name="answernew" id="answernew" class="px" />
							<p class="d">{lang memcp_profile_security_answer_comment}</p>
						</td>
					</tr>
					<!--{if checkperm('seccode') && ($secqaacheck || $seccodecheck)}-->
					{eval $sectpl = '<tr><th><sec></th><td><sec><p class="d"><sec></p></td>';}
					{template common/seccheck}
					<!--{/if}-->
					<tr>
						<th>&nbsp;</th>
						<td><button type="submit" name="pwdsubmit" value="true" class="pn pnp" /><strong>{lang save}</strong></button></td>
					</tr>
				</table>
				<input type="hidden" name="passwordsubmit" value="true" />
			</form>
		<!--{else}-->
			{subtemplate home/spacecp_profile_nav}
			
			<iframe id="frame_profile" name="frame_profile" style="display: none"></iframe>
			<form action="home.php?mod=spacecp&ac=profile&op=$operation" method="post" autocomplete="off" target="frame_profile">
				<input type="hidden" value="{FORMHASH}" name="formhash" />
				<table cellspacing="0" cellpadding="0" class="tfm">
					<tr>
						<th>{lang username}</th>
						<td>$_G[username]</td>
						<td>&nbsp;</td>
					</tr>
				<!--{loop $settings $key $value}-->
				<!--{if $value[available]}-->
					<tr>
						<th id="th_$key"><!--{if $value[required]}--><strong class="rq" title="{lang required}">*</strong><!--{/if}-->$value[title]</th>
						<td id="td_$key">
							$htmls[$key]
						</td>
						<td class="p">
							<!--{if $value[showinthread]}-->
							<input type="hidden" name="privacy[$key]" value="3" />
							<!--{else}-->
							<select name="privacy[$key]">
								<option value="0"{if $privacy[$key] == "0"} selected="selected"{/if}>{lang open_privacy}</option>
								<option value="1"{if $privacy[$key] == "1"} selected="selected"{/if}>{lang friend_privacy}</option>
								<option value="3"{if $privacy[$key] == "3"} selected="selected"{/if}>{lang secrecy}</option>
							</select>
							<!--{/if}-->
						</td>
					</tr>
				<!--{/if}-->
				<!--{/loop}-->
				<!--{if $operation == 'bbs'}-->
				<!--{if $allowcstatus}-->
				<tr>
					<th id="th_customstatus">{lang permission_basic_status}</th>
					<td id="td_customstatus"><input type="text" value="$space[customstatus]" name="customstatus" id="customstatus" class="px" /></td>
					<td>&nbsp;</td>
				</tr>
				<!--{/if}-->
				<!--{if $_G['group']['maxsigsize']}-->
				<tr>
					<th id="th_sightml">{lang personal_signature}</th>
					<td id="td_sightml">
						<div class="tedt">
							<div class="bar">
								<span class="y"><a href="javascript:;" onclick="$('signhtmlpreview').innerHTML = bbcode2html($('sightmlmessage').value)">{lang preview}</a></span>
								<!--{if $_G['group']['allowsigbbcode']}-->
									<!--{if $_G['group']['allowsigimgcode']}-->
										{eval $seditor = array('sightml', array('bold', 'color', 'img', 'link', 'smilies'));}
									<!--{else}-->
										{eval $seditor = array('sightml', array('bold', 'color', 'link', 'smilies'));}
									<!--{/if}-->
									{subtemplate common/seditor}
								<!--{/if}-->
							</div>
							<div class="area">
								<textarea rows="3" cols="80" name="sightml" id="sightmlmessage" class="pt" onkeydown="ctrlEnter(event, 'profilesubmitbtn');">$space[sightml]</textarea>
							</div>
						</div>
						<div id="signhtmlpreview"></div>
						<script type="text/javascript" src="{$_G[setting][jspath]}bbcode.js?{VERHASH}"></script>
						<script type="text/javascript">var forumallowhtml = 0,allowhtml = 0,allowsmilies = 0,allowbbcode = parseInt('{$_G[group][allowsigbbcode]}'),allowimgcode = parseInt('{$_G[group][allowsigimgcode]}');var DISCUZCODE = [];DISCUZCODE['num'] = '-1';DISCUZCODE['html'] = [];</script>
					</td>
					<td>&nbsp;</td>
				</tr>
				<!--{/if}-->
				<tr>
					<th id="th_timeoffset">{lang time_zone}</th>
					<td id="td_timeoffset">
						<!--{eval $timeoffset = array({lang timezone});}-->
						<select name="timeoffset">
							<!--{loop $timeoffset $key $desc}-->
							<option value="$key"<!--{if $key==$space[timeoffset]}--> selected="selected"<!--{/if}-->>$desc</option>
							<!--{/loop}-->
						</select>
						<p class="mtn">{lang current_time} : <!--{date($_G[timestamp])}--></p>
						<p class="d">{lang time_zone_message}</p>
					</td>
					<td>&nbsp;</td>
				</tr>
				<!--{/if}-->
				
				<!--{if $operation == 'plugin'}-->
					{eval include(template($_G['gp_id']));}
				<!--{/if}-->
				<tr>
					<th>&nbsp;</th>
					<td colspan="2">
						<input type="hidden" name="profilesubmit" value="true" />
						<button type="submit" name="profilesubmitbtn" id="profilesubmitbtn" value="true" class="pn pnp" /><strong>{lang save}</strong></button>
						<span id="submit_result" class="rq"></span>
					</td>
				</tr>
				</table>
			</form>
			<script type="text/javascript">
				function show_error(fieldid, extrainfo) {
					var elem = $('th_'+fieldid);
					if(elem) {
						elem.className = "rq";
						fieldname = elem.innerHTML;
						extrainfo = (typeof extrainfo == "string") ? extrainfo : "";
						$('submit_result').innerHTML = " {lang check_date_item} " + fieldname + extrainfo;
					}
				}
				function show_success() {
					showDialog('{lang update_date_success}', 'notice', '{lang reminder}', null, 0)
					top.window.location.href = top.window.location.href;
				}
			</script>
		<!--{/if}-->
		</div>
	</div>
	<div class="sd">
		{subtemplate common/userabout}
	</div>
</div>
<!--{template common/footer}-->
